// Decompiled on 周六 2月 22 19:31:49 CST 2025 with Zomboid Decompiler v0.1.3 using Vineflower.
package zombie;

public class BitMatrix {
    public static boolean Is(int test, int x, int y, int z) {
        return (1 << (x + 1) * 9 + (y + 1) * 3 + z + 1 & test) == 1 << (x + 1) * 9 + (y + 1) * 3 + z + 1;
    }

    public static int Set(int set, int x, int y, int z, boolean bTrue) {
        if (bTrue) {
            set |= 1 << (x + 1) * 9 + (y + 1) * 3 + z + 1;
        } else {
            set &= ~(1 << (x + 1) * 9 + (y + 1) * 3 + z + 1);
        }

        return set;
    }
}
